Optimal. Leaf size=68 \[ \frac {b x \sqrt {-c+d x} \sqrt {c+d x}}{2 d^2}+\frac {\left (b c^2+2 a d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {397, 65, 223,
212} \begin {gather*} \frac {\left (2 a d^2+b c^2\right ) \tanh ^{-1}\left (\frac {\sqrt {d x-c}}{\sqrt {c+d x}}\right )}{d^3}+\frac {b x \sqrt {d x-c} \sqrt {c+d x}}{2 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 212
Rule 223
Rule 397
Rubi steps
\begin {align*} \int \frac {a+b x^2}{\sqrt {-c+d x} \sqrt {c+d x}} \, dx &=\frac {b x \sqrt {-c+d x} \sqrt {c+d x}}{2 d^2}-\frac {\left (-b c^2-2 a d^2\right ) \int \frac {1}{\sqrt {-c+d x} \sqrt {c+d x}} \, dx}{2 d^2}\\ &=\frac {b x \sqrt {-c+d x} \sqrt {c+d x}}{2 d^2}+\frac {\left (b c^2+2 a d^2\right ) \text {Subst}\left (\int \frac {1}{\sqrt {2 c+x^2}} \, dx,x,\sqrt {-c+d x}\right )}{d^3}\\ &=\frac {b x \sqrt {-c+d x} \sqrt {c+d x}}{2 d^2}+\frac {\left (b c^2+2 a d^2\right ) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d^3}\\ &=\frac {b x \sqrt {-c+d x} \sqrt {c+d x}}{2 d^2}+\frac {\left (b c^2+2 a d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 68, normalized size = 1.00 \begin {gather*} \frac {b d x \sqrt {-c+d x} \sqrt {c+d x}+2 \left (b c^2+2 a d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{2 d^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.29, size = 124, normalized size = 1.82
method | result | size |
default | \(\frac {\sqrt {d x -c}\, \sqrt {d x +c}\, \left (\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\left (d \right ) d b x +\ln \left (\left (\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\left (d \right )+d x \right ) \mathrm {csgn}\left (d \right )\right ) b \,c^{2}+2 \ln \left (\left (\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\left (d \right )+d x \right ) \mathrm {csgn}\left (d \right )\right ) a \,d^{2}\right ) \mathrm {csgn}\left (d \right )}{2 d^{3} \sqrt {d^{2} x^{2}-c^{2}}}\) | \(124\) |
risch | \(-\frac {\left (-d x +c \right ) \sqrt {d x +c}\, b x}{2 d^{2} \sqrt {d x -c}}+\frac {\left (\frac {\ln \left (\frac {d^{2} x}{\sqrt {d^{2}}}+\sqrt {d^{2} x^{2}-c^{2}}\right ) a}{\sqrt {d^{2}}}+\frac {\ln \left (\frac {d^{2} x}{\sqrt {d^{2}}}+\sqrt {d^{2} x^{2}-c^{2}}\right ) b \,c^{2}}{2 d^{2} \sqrt {d^{2}}}\right ) \sqrt {\left (d x -c \right ) \left (d x +c \right )}}{\sqrt {d x -c}\, \sqrt {d x +c}}\) | \(139\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 89, normalized size = 1.31 \begin {gather*} \frac {b c^{2} \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{2 \, d^{3}} + \frac {a \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{d} + \frac {\sqrt {d^{2} x^{2} - c^{2}} b x}{2 \, d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.72, size = 63, normalized size = 0.93 \begin {gather*} \frac {\sqrt {d x + c} \sqrt {d x - c} b d x - {\left (b c^{2} + 2 \, a d^{2}\right )} \log \left (-d x + \sqrt {d x + c} \sqrt {d x - c}\right )}{2 \, d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.56, size = 79, normalized size = 1.16 \begin {gather*} \frac {\sqrt {d x + c} \sqrt {d x - c} {\left (\frac {{\left (d x + c\right )} b}{d^{2}} - \frac {b c}{d^{2}}\right )} - \frac {2 \, {\left (b c^{2} + 2 \, a d^{2}\right )} \log \left ({\left | -\sqrt {d x + c} + \sqrt {d x - c} \right |}\right )}{d^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 10.80, size = 417, normalized size = 6.13 \begin {gather*} \frac {\frac {2\,b\,c^2\,\left (\sqrt {c+d\,x}-\sqrt {c}\right )}{\sqrt {-c}-\sqrt {d\,x-c}}+\frac {14\,b\,c^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^3}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^3}+\frac {14\,b\,c^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^5}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^5}+\frac {2\,b\,c^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^7}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^7}}{d^3-\frac {4\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+\frac {6\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}-\frac {4\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^6}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^6}+\frac {d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^8}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^8}}+\frac {4\,a\,\mathrm {atan}\left (\frac {d\,\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}{\sqrt {-d^2}\,\left (\sqrt {c+d\,x}-\sqrt {c}\right )}\right )}{\sqrt {-d^2}}-\frac {2\,b\,c^2\,\mathrm {atanh}\left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )}{d^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________